home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / imglib2 / imgILoader.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  8KB  |  174 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM imgILoader.idl
  3.  */
  4.  
  5. #ifndef __gen_imgILoader_h__
  6. #define __gen_imgILoader_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIRequest_h__
  14. #include "nsIRequest.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. class imgIDecoderObserver; /* forward declaration */
  22.  
  23. class imgIRequest; /* forward declaration */
  24.  
  25. class nsIChannel; /* forward declaration */
  26.  
  27. class nsILoadGroup; /* forward declaration */
  28.  
  29. class nsIStreamListener; /* forward declaration */
  30.  
  31. class nsIURI; /* forward declaration */
  32.  
  33. class nsISimpleEnumerator; /* forward declaration */
  34.  
  35.  
  36. /* starting interface:    imgILoader */
  37. #define IMGILOADER_IID_STR "a32826ff-9e56-4425-a811-97a8dba64ff5"
  38.  
  39. #define IMGILOADER_IID \
  40.   {0xa32826ff, 0x9e56, 0x4425, \
  41.     { 0xa8, 0x11, 0x97, 0xa8, 0xdb, 0xa6, 0x4f, 0xf5 }}
  42.  
  43. /**
  44.  * imgILoader interface
  45.  *
  46.  * @author Stuart Parmenter <pavlov@netscape.com>
  47.  * @version 0.3
  48.  * @see imagelib2
  49.  */
  50. class NS_NO_VTABLE imgILoader : public nsISupports {
  51.  public: 
  52.  
  53.   NS_DEFINE_STATIC_IID_ACCESSOR(IMGILOADER_IID)
  54.  
  55.   /**
  56.    * Start the load and decode of an image.
  57.    * @param aURI the URI to load
  58.    * @param aInitialDocumentURI the URI that 'initiated' the load -- used for 3rd party cookie blocking
  59.    * @param aReferrerURI the 'referring' URI
  60.    * @param aLoadGroup Loadgroup to put the image load into
  61.    * @param aObserver the observer
  62.    * @param aCX some random data
  63.    * @param aLoadFlags Load flags for the request
  64.    * @param aCacheKey cache key to use for a load if the original
  65.    *                  image came from a request that had post data
  66.    * @param aRequest A newly created, unused imgIRequest object or NULL for one to
  67.                      be created for you.
  68.  
  69.  
  70.    * libpr0n does NOT keep a strong ref to the observer; this prevents
  71.    * reference cycles.  This means that callers of loadImage should
  72.    * make sure to Cancel() the resulting request before the observer
  73.    * goes away.
  74.    */
  75.   /* imgIRequest loadImage (in nsIURI aURI, in nsIURI aInitialDocumentURL, in nsIURI aReferrerURI, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest); */
  76.   NS_IMETHOD LoadImage(nsIURI *aURI, nsIURI *aInitialDocumentURL, nsIURI *aReferrerURI, nsILoadGroup *aLoadGroup, imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags, nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval) = 0;
  77.  
  78.   /**
  79.    * Start the load and decode of an image.
  80.    * @param uri the URI to load
  81.    * @param aObserver the observer
  82.    * @param cx some random data
  83.    *
  84.    * libpr0n does NOT keep a strong ref to the observer; this prevents
  85.    * reference cycles.  This means that callers of loadImageWithChannel should
  86.    * make sure to Cancel() the resulting request before the observer goes away.
  87.    */
  88.   /* imgIRequest loadImageWithChannel (in nsIChannel aChannel, in imgIDecoderObserver aObserver, in nsISupports cx, out nsIStreamListener aListener); */
  89.   NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, imgIDecoderObserver *aObserver, nsISupports *cx, nsIStreamListener **aListener, imgIRequest **_retval) = 0;
  90.  
  91.   /**
  92.    * Checks if a decoder for the an image with the given mime type is available
  93.    * @param mimeType The type to find a decoder for
  94.    * @return true if a decoder is available, false otherwise
  95.    */
  96.   /* boolean supportImageWithMimeType (in string mimeType); */
  97.   NS_IMETHOD SupportImageWithMimeType(const char *mimeType, PRBool *_retval) = 0;
  98.  
  99. };
  100.  
  101. /* Use this macro when declaring classes that implement this interface. */
  102. #define NS_DECL_IMGILOADER \
  103.   NS_IMETHOD LoadImage(nsIURI *aURI, nsIURI *aInitialDocumentURL, nsIURI *aReferrerURI, nsILoadGroup *aLoadGroup, imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags, nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval); \
  104.   NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, imgIDecoderObserver *aObserver, nsISupports *cx, nsIStreamListener **aListener, imgIRequest **_retval); \
  105.   NS_IMETHOD SupportImageWithMimeType(const char *mimeType, PRBool *_retval); 
  106.  
  107. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  108. #define NS_FORWARD_IMGILOADER(_to) \
  109.   NS_IMETHOD LoadImage(nsIURI *aURI, nsIURI *aInitialDocumentURL, nsIURI *aReferrerURI, nsILoadGroup *aLoadGroup, imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags, nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval) { return _to LoadImage(aURI, aInitialDocumentURL, aReferrerURI, aLoadGroup, aObserver, aCX, aLoadFlags, cacheKey, aRequest, _retval); } \
  110.   NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, imgIDecoderObserver *aObserver, nsISupports *cx, nsIStreamListener **aListener, imgIRequest **_retval) { return _to LoadImageWithChannel(aChannel, aObserver, cx, aListener, _retval); } \
  111.   NS_IMETHOD SupportImageWithMimeType(const char *mimeType, PRBool *_retval) { return _to SupportImageWithMimeType(mimeType, _retval); } 
  112.  
  113. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  114. #define NS_FORWARD_SAFE_IMGILOADER(_to) \
  115.   NS_IMETHOD LoadImage(nsIURI *aURI, nsIURI *aInitialDocumentURL, nsIURI *aReferrerURI, nsILoadGroup *aLoadGroup, imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags, nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadImage(aURI, aInitialDocumentURL, aReferrerURI, aLoadGroup, aObserver, aCX, aLoadFlags, cacheKey, aRequest, _retval); } \
  116.   NS_IMETHOD LoadImageWithChannel(nsIChannel *aChannel, imgIDecoderObserver *aObserver, nsISupports *cx, nsIStreamListener **aListener, imgIRequest **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadImageWithChannel(aChannel, aObserver, cx, aListener, _retval); } \
  117.   NS_IMETHOD SupportImageWithMimeType(const char *mimeType, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportImageWithMimeType(mimeType, _retval); } 
  118.  
  119. #if 0
  120. /* Use the code below as a template for the implementation class for this interface. */
  121.  
  122. /* Header file */
  123. class _MYCLASS_ : public imgILoader
  124. {
  125. public:
  126.   NS_DECL_ISUPPORTS
  127.   NS_DECL_IMGILOADER
  128.  
  129.   _MYCLASS_();
  130.  
  131. private:
  132.   ~_MYCLASS_();
  133.  
  134. protected:
  135.   /* additional members */
  136. };
  137.  
  138. /* Implementation file */
  139. NS_IMPL_ISUPPORTS1(_MYCLASS_, imgILoader)
  140.  
  141. _MYCLASS_::_MYCLASS_()
  142. {
  143.   /* member initializers and constructor code */
  144. }
  145.  
  146. _MYCLASS_::~_MYCLASS_()
  147. {
  148.   /* destructor code */
  149. }
  150.  
  151. /* imgIRequest loadImage (in nsIURI aURI, in nsIURI aInitialDocumentURL, in nsIURI aReferrerURI, in nsILoadGroup aLoadGroup, in imgIDecoderObserver aObserver, in nsISupports aCX, in nsLoadFlags aLoadFlags, in nsISupports cacheKey, in imgIRequest aRequest); */
  152. NS_IMETHODIMP _MYCLASS_::LoadImage(nsIURI *aURI, nsIURI *aInitialDocumentURL, nsIURI *aReferrerURI, nsILoadGroup *aLoadGroup, imgIDecoderObserver *aObserver, nsISupports *aCX, nsLoadFlags aLoadFlags, nsISupports *cacheKey, imgIRequest *aRequest, imgIRequest **_retval)
  153. {
  154.     return NS_ERROR_NOT_IMPLEMENTED;
  155. }
  156.  
  157. /* imgIRequest loadImageWithChannel (in nsIChannel aChannel, in imgIDecoderObserver aObserver, in nsISupports cx, out nsIStreamListener aListener); */
  158. NS_IMETHODIMP _MYCLASS_::LoadImageWithChannel(nsIChannel *aChannel, imgIDecoderObserver *aObserver, nsISupports *cx, nsIStreamListener **aListener, imgIRequest **_retval)
  159. {
  160.     return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162.  
  163. /* boolean supportImageWithMimeType (in string mimeType); */
  164. NS_IMETHODIMP _MYCLASS_::SupportImageWithMimeType(const char *mimeType, PRBool *_retval)
  165. {
  166.     return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168.  
  169. /* End of implementation class template. */
  170. #endif
  171.  
  172.  
  173. #endif /* __gen_imgILoader_h__ */
  174.